import Mock from "mockjs";
const Random = Mock.Random

let Result = {
    code: 200,
    msg: "操作成功",
    data: null
}
Mock.mock("/sys/menu","get",()=>{
    Result.data = [
        {
            id: 1,
            index: '1',
            name: "用户",
            EName: "User",
            path: "/user",
            children: [
                //{
                //    id: 1.1,
                //    index: '1-1',
                //    name: "个人信息",
                //    EName: "SelfInfo",
                //    path: "/selfInfo",
                //},
                {
                    id: 1.2,
                    index: '1-2',
                    name: "用户管理",
                    EName: "GeneralUser",
                    path: "/displayList",
                    query: "generalUser"
                }
            ]
        },
        {
            id: 2,
            index: '2',
            name: "图书",
            EName: "Book",
            path: "/book",
            children: [
                {
                    id: 2.1,
                    index: '2-1',
                    name: "图书管理",
                    EName: "Book",
                    path: "/displayList",
                    query: "book"
                },
                {
                    id: 2.2,
                    index: '2-2',
                    name: "图书类型管理",
                    EName: "BookType",
                    path: "/displayList",
                    query: "bookType"
                },
            ]
        },
        {
            id: 3,
            index: '3',
            name: "借阅",
            EName: "Borrow",
            path: "/borrow",
            children: [
                {
                    id: 3.1,
                    index: '3-1',
                    name: "借阅管理",
                    EName: "Borrow",
                    path: "/displayList",
                    query: "borrow"
                },
            ]
        },
        {
            id: 4,
            index: '4',
            name: "权限",
            EName: "Authority",
            path: "/authority",
            children: [
                {
                    id: 4.1,
                    index: '4-1',
                    name: "用户角色管理",
                    EName: "Role",
                    path: "/displayList",
                    query: "role"
                },
                //{
                //    id: 4.2,
                //    index: '4-2',
                //    name: "菜单管理",
                //    EName: "Menu",
                //    path: "/displayList",
                //    query: "menu"
                //}
            ]
        }
    ]
    return Result;
})

export default Mock;
